﻿<phone:PhoneApplicationPage 
    x:Class="ActivityTracker.Views.Activities.AddPastHistoryFromPanorama"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False"
    Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Foreground="White" Text="ACTIVITY TRACKER - ADD PAST ACTIVITY" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>
        <Grid x:Name="ContentPanel" Width="450" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Text="Activity Name" Foreground="White" Grid.Row="0"  Style="{StaticResource PhoneTextTitle2Style}"/>
            <toolkit:ListPicker Foreground="White" ItemsSource="{Binding}" Grid.Row="1" x:Name="lpicActivities"  SelectionChanged="lpicActivities_SelectionChanged">
                <toolkit:ListPicker.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding ActName}" Margin="0 0 0 0"/>
                        </StackPanel>
                    </DataTemplate>
                </toolkit:ListPicker.ItemTemplate>
                <toolkit:ListPicker.FullModeItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Margin="16 21 0 20">
                            <TextBlock Text="{Binding ActName}" Margin="16 0 0 0" FontSize="32" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                        </StackPanel>
                    </DataTemplate>
                </toolkit:ListPicker.FullModeItemTemplate>
            </toolkit:ListPicker>
            <TextBlock Grid.Row="2" Foreground="White" Text="Select Date" Style="{StaticResource PhoneTextTitle2Style}"></TextBlock>
            <toolkit:DatePicker Foreground="White" Grid.Row="3" x:Name="dpicDate"></toolkit:DatePicker>
            <TextBlock Grid.Row="4" Foreground="White" Text="Select Start Time" Style="{StaticResource PhoneTextTitle2Style}" ></TextBlock>
            <toolkit:TimePicker Foreground="White" x:Name="dpicStartTime" Grid.Row="5" ValueChanged="dpicStartTime_ValueChanged"></toolkit:TimePicker>
            <TextBlock Grid.Row="6" Foreground="White" Text="Select End Time" Style="{StaticResource PhoneTextTitle2Style}" ></TextBlock>
            <toolkit:TimePicker Foreground="White"  x:Name="dpicEndTime" Grid.Row="7" ValueChanged="dpicEndTime_ValueChanged" ></toolkit:TimePicker>
            <!--<TextBlock Grid.Row="8" x:Name="txtblkTotalDuration" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" Text="0" Visibility="Collapsed"></TextBlock>-->
            <StackPanel Grid.Row="8" Orientation="Horizontal">
                <TextBlock Foreground="White" Text="Duration:" Style="{StaticResource PhoneTextTitle2Style}"/>
                <TextBlock  Foreground="White" x:Name="tblkTotalDuration" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" Text="0" Visibility="Visible"></TextBlock>
                <TextBlock  Foreground="White" Text="Min" Style="{StaticResource PhoneTextTitle2Style}"/>
            </StackPanel>
            <StackPanel Margin="0,57,0,0" Grid.Row="9">
                <my:AdControl Grid.Row="9" Margin="0,5,0,0" Height="80" HorizontalAlignment="Center" x:Name="adControl2" VerticalAlignment="Top" Width="480" ApplicationId="c8736437-6eec-403e-b9d4-333c4e6794d1" AdUnitId="28360" IsAutoRefreshEnabled="True" BorderBrush="Transparent"/>
            </StackPanel>
        </Grid>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="save" Click="AppBarSave_Click"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.questionmark.rest.png" Text="help" Click="AppBarHelp_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
